function FindNumbersWithSum(array, sum)
{
    // write code here
    if(array.length === 0) return []
    let left = 0
    let right = array.length - 1
    while(left < right){
      let nowSum = array[left] + array[right]
      if(nowSum < sum){
        left++
      }else if(nowSum > sum){
        right--
      }else{
        return [array[left],array[right]]
      }
    }
    return []
}
module.exports = {
    FindNumbersWithSum : FindNumbersWithSum
};